<template>
  <div class="u-page u-page-process-bg u-box">
    <!-- 标题 -->
    <div class="u-cl-white u-pt-20 u-pb-20">
      <div class="u-fz-26 u-font-bold">{{ form.subject }}</div>
      <div class="u-number u-pb-10 u-pt-10">NO.{{ form.taskNum }}</div>
    </div>
    <!-- 表单 -->
    <div
      class="rule-form rule-form-input-right u-box u-radius-lg u-shadow u-bcl-white"
    >
      <u-form ref="uForm" :model="form">
        <u-form-item
          label="需求描述"
          label-position="top"
          :border-bottom="false"
        >
          <div><u-parse :html="this.escape2Html(form.details)"></u-parse></div>
        </u-form-item>
        <!-- 附件 -->
        <div class="aui-file">
          <Upload
            u_appid="ExpertCooperate"
            :u_fieldName="form.createUser"
            :u_orunid="form.taskNum"
            u_type="3"
            :u_readonly="false"
            :u_initialAttchments="ResumeFiles"
          >
          </Upload>
        </div>

        <u-form-item label="项目预算">
          <div class="u-text-right">{{ form.budget }}</div>
        </u-form-item>

        <u-form-item label="付款方式">
          <div class="u-text-right">{{ form.paymentType }}</div>
        </u-form-item>

        <u-form-item label="报名截止日期">
          <div class="u-text-right">{{ form.deadline }}</div>
        </u-form-item>
      </u-form>
    </div>

    <!-- 复制按钮 -->
    <div class="u-mt-20 u-mb-10">
      <button class="customStyle" @click="copyDemand">
        <u-icon name="zhuanfa" color="#9d9d9d"></u-icon>
        <span style="font-size: 18rpx">复制</span>
      </button>
      <button
        class="customStyle"
        @click="Collection"
        v-if="collections.indexOf(taskNumber) > -1"
      >
        <u-icon name="star-fill" color="red"></u-icon>
        <span style="font-size: 18rpx; color: red">收藏</span>
      </button>
      <button class="customStyle" @click="Collection" v-else>
        <u-icon name="star" color="#9d9d9d"></u-icon>
        <span style="font-size: 18rpx">收藏</span>
      </button>

      <u-button type="primary" shape="circle" @click="signupHomeDemand">
        抢机会
      </u-button>
    </div>
  </div>
</template>

<script src="./js/grabJob.js"></script>
<style src="./css/common.scss" lang="scss"></style>
